package com.yxb.profile.mapper;

import java.util.List;
import com.yxb.profile.domain.TeacherProfile;
import org.apache.ibatis.annotations.Select;

/**
 * 教员信息Mapper接口
 * 
 * @author 林德炫
 * @date 2025-03-28
 */
public interface TeacherProfileMapper 
{
    /**
     * 查询教员信息
     * 
     * @param teacherId 教员信息主键
     * @return 教员信息
     */
    public TeacherProfile selectTeacherProfileByTeacherId(Long teacherId);

    /**
     * 查询教员信息列表
     * 
     * @param teacherProfile 教员信息
     * @return 教员信息集合
     */
    public List<TeacherProfile> selectTeacherProfileList(TeacherProfile teacherProfile);

    /**
     * 新增教员信息
     * 
     * @param teacherProfile 教员信息
     * @return 结果
     */
    public int insertTeacherProfile(TeacherProfile teacherProfile);

    /**
     * 修改教员信息
     * 
     * @param teacherProfile 教员信息
     * @return 结果
     */
    public int updateTeacherProfile(TeacherProfile teacherProfile);

    /**
     * 删除教员信息
     * 
     * @param teacherId 教员信息主键
     * @return 结果
     */
    public int deleteTeacherProfileByTeacherId(Long teacherId);

    /**
     * 批量删除教员信息
     * 
     * @param teacherIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTeacherProfileByTeacherIds(Long[] teacherIds);

    @Select("select phone_number from teacher_profile where user_id = #{userId}")
    String getTeacherPhone(Long userId);

    @Select("select * from teacher_profile")
    List<TeacherProfile> getTeacherList();

    @Select("select * from teacher_profile where teachingcategory_name = #{categoryName}")
    List<TeacherProfile> getTeacherListByCategoryId(String categoryName);

    @Select("select * from teacher_profile where teacher_id = #{teacherId}")
    TeacherProfile getTeacherDetailByTeacherId(String teacherId);

    @Select("select * from teacher_profile where teachingcategory_name = #{categoryName}")
    List<TeacherProfile> getTeacherListByCategoryName(String categoryName);
}
